package com.ssm.dboss;

import okhttp3.*;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;

public class DbossRedisTool {

    public static void main(String[] args) {
        Map<String, String> map = new HashMap<>();

        map.put("ad-feedback-6551", "ad-feedback-6551");

        map.put("aggre-service-ratelimit-6401", "aggre-service-ratelimit-6401");

        map.put("award-center-6548", "award-center-6548");

        map.put("backup-trans", "backup-trans");

        map.put("bigdata-public-6403", "bigdata-public-6403");

        map.put("bigdata-realtime-6527", "bigdata-realtime-6527");

        map.put("broker-6558", "broker-6558");

        map.put("broker-clearing-cancel-6400", "broker-clearing-cancel-6400");

        map.put("broker-clearing-state-6406", "broker-clearing-state-6406");

        map.put("broker-fee-6397", "broker-fee-6397");

        map.put("broker-public-6393", "broker-public-6393");

        map.put("broker-redis-6437", "broker-redis-6437");

        map.put("brokerage-redis", "brokerage-redis");

        map.put("candlestick-6432", "candlestick-6432");

        map.put("cdp-redis-6441", "cdp-redis-6441");

        map.put("cluster-6411", "cluster-6411");

        map.put("cluster-6412", "cluster-6412");

        map.put("cluster-6415", "cluster-6415");

        map.put("cluster-6456", "cluster-6456");

        map.put("cluster-6481", "cluster-6481");

        map.put("cluster-6492", "cluster-6492");

        map.put("cluster-6494", "cluster-6494");

        map.put("cluster-6495", "cluster-6495");

        map.put("cluster-6497", "cluster-6497");

        map.put("cluster-6498", "cluster-6498");

        map.put("cluster-6499", "cluster-6499");

        map.put("cluster-6500", "cluster-6500");

        map.put("cluster-6501", "cluster-6501");

        map.put("cluster-6503", "cluster-6503");

        map.put("cluster-6515", "cluster-6515");

        map.put("cluster-6516", "cluster-6516");

        map.put("cluster-6517", "cluster-6517");

        map.put("cluster-6903", "cluster-6903");

        map.put("cluster-6904", "cluster-6904");

        map.put("cluster-6905", "cluster-6905");

        map.put("cluster-6906", "cluster-6906");

        map.put("cluster-6912", "cluster-6912");

        map.put("cluster-6914", "cluster-6914");

        map.put("cluster-earning-1", "cluster-earning-1");

        map.put("cluster-earning-2", "cluster-earning-2");

        map.put("common-644-index-6570", "common-644-index-6570");

        map.put("common-644-index-redis", "common-644-index-redis");

        map.put("common-prd-cd-session", "common-prd-cd-session");

        map.put("content-home-feed-6553", "content-home-feed-6553");

        map.put("contract-644-match-index-redis", "contract-644-match-index-redis");

        map.put("contract-644-match-index-redis2", "contract-644-match-index-redis2");

        map.put("contract-644-match-index-redis3", "contract-644-match-index-redis3");

        map.put("contract-644-match-redis", "contract-644-match-redis");

        map.put("contract-644-match-redis2", "contract-644-match-redis2");

        map.put("contract-644-prd-cd-orderlimit", "contract-644-prd-cd-orderlimit");

        map.put("contract-644-prd-cd-redis3", "contract-644-prd-cd-redis3");

        map.put("contract-644-prd-center-new-redis", "contract-644-prd-center-new-redis");

        map.put("contract-prd-cd-dbsync1", "contract-prd-cd-dbsync1");

        map.put("contract-prd-cd-dbsync2", "contract-prd-cd-dbsync2");

        map.put("contract-prd-cd-fifo1", "contract-prd-cd-fifo1");

        map.put("contract-prd-cd-fifo2", "contract-prd-cd-fifo2");

        map.put("contract-prd-cd-redis2", "contract-prd-cd-redis2");

        map.put("contract-prd-cd-symbol1", "contract-prd-cd-symbol1");

        map.put("contract-prd-cd-symbol10", "contract-prd-cd-symbol10");

        map.put("contract-prd-cd-symbol11", "contract-prd-cd-symbol11");

        map.put("contract-prd-cd-symbol12", "contract-prd-cd-symbol12");

        map.put("contract-prd-cd-symbol2", "contract-prd-cd-symbol2");

        map.put("contract-prd-cd-symbol3", "contract-prd-cd-symbol3");

        map.put("contract-prd-cd-symbol4", "contract-prd-cd-symbol4");

        map.put("contract-prd-cd-symbol5", "contract-prd-cd-symbol5");

        map.put("contract-prd-cd-symbol6", "contract-prd-cd-symbol6");

        map.put("contract-prd-cd-symbol7", "contract-prd-cd-symbol7");

        map.put("contract-prd-cd-symbol8", "contract-prd-cd-symbol8");

        map.put("contract-prd-cd-symbol9", "contract-prd-cd-symbol9");

        map.put("contract-rc-6565", "contract-rc-6565");

        map.put("crm-6550", "crm-6550");

        map.put("data-migration-6402", "data-migration-6402");

        map.put("dawn-broker-ratelimit-6380", "dawn-broker-ratelimit-6380");

        map.put("dawn-broker-ratelimit-6443", "dawn-broker-ratelimit-6443");

        map.put("dawn-broker-ratelimit-6477", "dawn-broker-ratelimit-6477");

        map.put("dawn-broker-ratelimit-6478", "dawn-broker-ratelimit-6478");

        map.put("dawn-broker-ratelimit-6487", "dawn-broker-ratelimit-6487");

        map.put("dawn-broker-ratelimit-6488", "dawn-broker-ratelimit-6488");

        map.put("dawn-broker-ratelimit-6489", "dawn-broker-ratelimit-6489");

        map.put("dawn-broker-ratelimit-6490", "dawn-broker-ratelimit-6490");

        map.put("defi-gogo-6425", "defi-gogo-6425");

        map.put("defi-hdex-6913", "defi-hdex-6913");

        map.put("defi_chainmonitor-6504", "defi_chainmonitor-6504");

        map.put("devops-6394", "devops-6394");

        map.put("downbroker-token-6547", "downbroker-token-6547");

        map.put("dw-ratelimit-6386", "dw-ratelimit-6386");

        map.put("ehr-6507", "ehr-6507");

        map.put("fiat-currency-6534", "fiat-currency-6534");

        map.put("fin-rpt-6901", "fin-rpt-6901");

        map.put("frey-workflow-6554", "frey-workflow-6554");

        map.put("ga-jp-redis", "ga-jp-redis");

        map.put("ga-jp-redis-ro", "ga-jp-redis-ro");

        map.put("glb-rm-syn-6560", "glb-rm-syn-6560");

        map.put("global-service-redis-6568", "global-service-redis-6568");

        map.put("harbor-6510", "harbor-6510");

        map.put("hb-bit-6429", "hb-bit-6429");

        map.put("hb-china-6396", "hb-china-6396");

        map.put("hb-data-6426", "hb-data-6426");

        map.put("hb-data-6486", "hb-data-6486");

        map.put("hb-defi-6408", "hb-defi-6408");

        map.put("hb-huochain-6409", "hb-huochain-6409");

        map.put("hb-pool-6900", "hb-pool-6900");

        map.put("hb-pool-redis", "hb-pool-redis");

        map.put("hb-session-6424", "hb-session-6424");

        map.put("hbg-app-jp-6453", "hbg-app-jp-6453");

        map.put("hbg-biz-6549", "hbg-biz-6549");

        map.put("hbg-common-6428", "hbg-common-6428");

        map.put("hbg-common-6440", "hbg-common-6440");

        map.put("hbg-common-6482", "hbg-common-6482");

        map.put("hbg-commondb-6434", "hbg-commondb-6434");

        map.put("hbg-margin-fee-6455", "hbg-margin-fee-6455");

        map.put("hbg-order-redis", "hbg-order-redis");

        map.put("hbg-order-web-6446", "hbg-order-web-6446");

        map.put("hbg-order-web-6481", "hbg-order-web-6481");

        map.put("hbg-pp-search-6561", "hbg-pp-search-6561");

        map.put("hbg-prime-6444", "hbg-prime-6444");

        map.put("hbg-prime-box-6532", "hbg-prime-box-6532");

        map.put("hbg-tkn-6427", "hbg-tkn-6427");

        map.put("hbg-tkn-6479", "hbg-tkn-6479");

        map.put("hbg-tkn-6480", "hbg-tkn-6480");

        map.put("hbg-tkn-6482", "hbg-tkn-6482");

        map.put("hbg-tkn-6496", "hbg-tkn-6496");

        map.put("hbg_activity-6519", "hbg_activity-6519");

        map.put("hbg_assets_datax-6556", "hbg_assets_datax-6556");

        map.put("hbg_fiat-6528", "hbg_fiat-6528");

        map.put("hbg_prime_list-6522", "hbg_prime_list-6522");

        map.put("hbp_staking_vote-6505", "hbp_staking_vote-6505");

        map.put("heco-developer-6509", "heco-developer-6509");

        map.put("hgswap-6506", "hgswap-6506");

        map.put("hswap-6508", "hswap-6508");

        map.put("huobi-cloud", "huobi-cloud");

        map.put("huobi-inst-6911", "huobi-inst-6911");

        map.put("huochain-browser-6447", "huochain-browser-6447");

        map.put("im-moment-6902", "im-moment-6902");

        map.put("item_store-6569", "item_store-6569");

        map.put("jg-match-redis", "jg-match-redis");

        map.put("jg-match-redis2", "jg-match-redis2");

        map.put("layer2-6566", "layer2-6566");

        map.put("linear-swap-activity-6564", "linear-swap-activity-6564");

        map.put("liquidity-strategy-redis", "liquidity-strategy-redis");

        map.put("local-jp-redis", "local-jp-redis");

        map.put("local-jp-redis-cfd", "local-jp-redis-cfd");

        map.put("local-jp-redis-cfd-ro", "local-jp-redis-cfd-ro");

        map.put("local-jp-redis-ro", "local-jp-redis-ro");

        map.put("manage-platform-6448", "manage-platform-6448");

        map.put("marketui-redis-6518", "marketui-redis-6518");

        map.put("mds-svc-redis", "mds-svc-redis");

        map.put("mgt-6525", "mgt-6525");

        map.put("mgt-monitor-6410", "mgt-monitor-6410");

        map.put("mgt-redis-6407", "mgt-redis-6407");

        map.put("mulan-ams-dw-6483", "mulan-ams-dw-6483");

        map.put("order-client-6391", "order-client-6391");

        map.put("order-common-6414", "order-common-6414");

        map.put("otc-account-6539", "otc-account-6539");

        map.put("otc-admin-6538", "otc-admin-6538");

        map.put("otc-adv-6537", "otc-adv-6537");

        map.put("otc-campaign-6535", "otc-campaign-6535");

        map.put("otc-chat-6541", "otc-chat-6541");

        map.put("otc-common-6536", "otc-common-6536");

        map.put("otc-option-6493", "otc-option-6493");

        map.put("otc-risk-6540", "otc-risk-6540");

        map.put("otc-stage", "otc-stage");

        map.put("otc-trade-6542", "otc-trade-6542");

        map.put("otc-user-6543", "otc-user-6543");

        map.put("P2P-merchant-tool-6563", "P2P-merchant-tool-6563");

        map.put("pledge-loan-6435", "pledge-loan-6435");

        map.put("proclamation-6909", "proclamation-6909");

        map.put("quantif-orderbook-ac-redis", "quantif-orderbook-ac-redis");

        map.put("quotation-common-6417", "quotation-common-6417");

        map.put("quotation-live-6529", "quotation-live-6529");

        map.put("rc-common-6419", "rc-common-6419");

        map.put("rc-factor-6521", "rc-factor-6521");

        map.put("rc-ip-6526", "rc-ip-6526");

        map.put("redis-quantification", "redis-quantification");

        map.put("sec-uep-6395", "sec-uep-6395");

        map.put("smart-chain-6907", "smart-chain-6907");

        map.put("spider-6530", "spider-6530");

        map.put("star-whitelist-6520", "star-whitelist-6520");

        map.put("start-whitelist-6520", "start-whitelist-6520");

        map.put("submited-state-6436", "submited-state-6436");

        map.put("swap-640-prd-cd-dbsync1", "swap-640-prd-cd-dbsync1");

        map.put("swap-640-prd-cd-dbsync2", "swap-640-prd-cd-dbsync2");

        map.put("swap-640-prd-cd-fifo1", "swap-640-prd-cd-fifo1");

        map.put("swap-640-prd-cd-fifo2", "swap-640-prd-cd-fifo2");

        map.put("swap-640-prd-cd-redis2", "swap-640-prd-cd-redis2");

        map.put("swap-640-prd-cd-symbol1", "swap-640-prd-cd-symbol1");

        map.put("swap-640-prd-cd-symbol10", "swap-640-prd-cd-symbol10");

        map.put("swap-640-prd-cd-symbol11", "swap-640-prd-cd-symbol11");

        map.put("swap-640-prd-cd-symbol12", "swap-640-prd-cd-symbol12");

        map.put("swap-640-prd-cd-symbol2", "swap-640-prd-cd-symbol2");

        map.put("swap-640-prd-cd-symbol3", "swap-640-prd-cd-symbol3");

        map.put("swap-640-prd-cd-symbol4", "swap-640-prd-cd-symbol4");

        map.put("swap-640-prd-cd-symbol5", "swap-640-prd-cd-symbol5");

        map.put("swap-640-prd-cd-symbol6", "swap-640-prd-cd-symbol6");

        map.put("swap-640-prd-cd-symbol7", "swap-640-prd-cd-symbol7");

        map.put("swap-640-prd-cd-symbol8", "swap-640-prd-cd-symbol8");

        map.put("swap-640-prd-cd-symbol9", "swap-640-prd-cd-symbol9");

        map.put("swap-644-prd-cd-orderlimit", "swap-644-prd-cd-orderlimit");

        map.put("swap-644-prd-cd-redis3", "swap-644-prd-cd-redis3");

        map.put("swap-644-prd-match-redis", "swap-644-prd-match-redis");

        map.put("swap-linear-640-prd-dbsync1", "swap-linear-640-prd-dbsync1");

        map.put("swap-linear-640-prd-dbsync2", "swap-linear-640-prd-dbsync2");

        map.put("swap-linear-640-prd-dbsync3", "swap-linear-640-prd-dbsync3");

        map.put("swap-linear-640-prd-fifo1", "swap-linear-640-prd-fifo1");

        map.put("swap-linear-640-prd-fifo2", "swap-linear-640-prd-fifo2");

        map.put("swap-linear-640-prd-fifo3", "swap-linear-640-prd-fifo3");

        map.put("swap-linear-640-prd-redis2-1", "swap-linear-640-prd-redis2-1");

        map.put("swap-linear-640-prd-redis2-2", "swap-linear-640-prd-redis2-2");

        map.put("swap-linear-640-prd-symbol1-1", "swap-linear-640-prd-symbol1-1");

        map.put("swap-linear-640-prd-symbol1-2", "swap-linear-640-prd-symbol1-2");

        map.put("swap-linear-640-prd-symbol1-3", "swap-linear-640-prd-symbol1-3");

        map.put("swap-linear-640-prd-symbol10", "swap-linear-640-prd-symbol10");

        map.put("swap-linear-640-prd-symbol11", "swap-linear-640-prd-symbol11");

        map.put("swap-linear-640-prd-symbol12", "swap-linear-640-prd-symbol12");

        map.put("swap-linear-640-prd-symbol13", "swap-linear-640-prd-symbol13");

        map.put("swap-linear-640-prd-symbol14", "swap-linear-640-prd-symbol14");

        map.put("swap-linear-640-prd-symbol15", "swap-linear-640-prd-symbol15");

        map.put("swap-linear-640-prd-symbol16", "swap-linear-640-prd-symbol16");

        map.put("swap-linear-640-prd-symbol17", "swap-linear-640-prd-symbol17");

        map.put("swap-linear-640-prd-symbol18", "swap-linear-640-prd-symbol18");

        map.put("swap-linear-640-prd-symbol19", "swap-linear-640-prd-symbol19");

        map.put("swap-linear-640-prd-symbol2", "swap-linear-640-prd-symbol2");

        map.put("swap-linear-640-prd-symbol20", "swap-linear-640-prd-symbol20");

        map.put("swap-linear-640-prd-symbol21", "swap-linear-640-prd-symbol21");

        map.put("swap-linear-640-prd-symbol22", "swap-linear-640-prd-symbol22");

        map.put("swap-linear-640-prd-symbol23", "swap-linear-640-prd-symbol23");

        map.put("swap-linear-640-prd-symbol24", "swap-linear-640-prd-symbol24");

        map.put("swap-linear-640-prd-symbol25", "swap-linear-640-prd-symbol25");

        map.put("swap-linear-640-prd-symbol3", "swap-linear-640-prd-symbol3");

        map.put("swap-linear-640-prd-symbol4", "swap-linear-640-prd-symbol4");

        map.put("swap-linear-640-prd-symbol5", "swap-linear-640-prd-symbol5");

        map.put("swap-linear-640-prd-symbol6", "swap-linear-640-prd-symbol6");

        map.put("swap-linear-640-prd-symbol7", "swap-linear-640-prd-symbol7");

        map.put("swap-linear-640-prd-symbol8", "swap-linear-640-prd-symbol8");

        map.put("swap-linear-640-prd-symbol9", "swap-linear-640-prd-symbol9");

        map.put("swap-linear-644-prd-match-redis", "swap-linear-644-prd-match-redis");

        map.put("swap-linear-644-prd-orderlimit", "swap-linear-644-prd-orderlimit");

        map.put("swap-linear-644-prd-redis3-1", "swap-linear-644-prd-redis3-1");

        map.put("swap-linear-644-prd-redis3-2", "swap-linear-644-prd-redis3-2");

        map.put("task-center-6552", "task-center-6552");

        map.put("tkn-redis-6418", "tkn-redis-6418");

        map.put("trans-202203051606", "trans-202203051606");

        map.put("travelrule-6557", "travelrule-6557");

        map.put("uc-cluster-6458", "uc-cluster-6458");

        map.put("uc-jp-redis", "uc-jp-redis");

        map.put("uc-limit-6405", "uc-limit-6405");

        map.put("uc-mc-6398", "uc-mc-6398");

        map.put("uc-redis-6399", "uc-redis-6399");

        map.put("userfeedbacklist-6567", "userfeedbacklist-6567");

        map.put("ventures-6511", "ventures-6511");

        map.put("wallet-redis-6454", "wallet-redis-6454");

        map.put("wallet-redis-6502", "wallet-redis-6502");
        map.put("wlt-redis-6908", "wlt-redis-6908");
        map.put("zkdex-6513", "zkdex-6513");


        map.keySet().forEach(item -> {
            OkHttpClient client = new OkHttpClient().newBuilder()
                    .build();
            MediaType mediaType = MediaType.parse("text/plain");
            RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
                    .addFormDataPart("title", "线上问题处理数据查询")
                    .addFormDataPart("cluster_name", item)
                    .addFormDataPart("valid_date", "2023-8-3")
                    .build();
            Request request = new Request.Builder()
                    .url("https://dbsos.huobiidc.com/applyredisprivileges/")
                    .method("POST", body)
                    .addHeader("cookie", " messages=\"f2154f0dd43e0253361b00b3f9dd427117a435e2$[[\\\"__json_message\\\"\\0540\\05425\\054\\\"Login succeeded. Welcome\\054 zhengshaohong.\\\"]]\"; csrftoken=jUJGawKvqssgxLGrXjEHlXbRHyLoHGBqnodDb8KDLPatwvjAtPaAKEQvfwPpRn86; sessionid=9nlvm5szqg8xbcu65conu8flbk6oyo5x; sessionid=9nlvm5szqg8xbcu65conu8flbk6oyo5x")
                    .addHeader("sec-ch-ua", " \".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\"")
                    .addHeader("sec-ch-ua-mobile", " ?0")
                    .addHeader("sec-ch-ua-platform", " \"macOS\"")
                    .addHeader("sec-fetch-dest", " empty")
                    .addHeader("sec-fetch-mode", " cors")
                    .addHeader("sec-fetch-site", " same-origin")
                    .addHeader("user-agent", " Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36")
                    .addHeader("x-requested-with", " XMLHttpRequest")
                    .build();

            try {
                Response response = client.newCall(request).execute();
                System.out.println(response.body());
                TimeUnit.SECONDS.sleep(1);
            } catch (IOException e) {
                throw new RuntimeException(e);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        });
    }
}
